import { createRouter, createWebHistory } from "vue-router";
const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: "/",
      name: "index",
      children: [
        {
          path: "",
          name: "home",
          component: () => import("@/views/Home.vue"),
          meta: { title: "欢迎来到慕课乐高" },
        },
      ],
    },
    {
      path: "/editor/:id",
      name: "editor",
      component: () =>
        import(/* webpackChunkName: "editor" */ "@/views/Editor.vue"),
      meta: { requiredLogin: true, title: "编辑我的设计" },
    },
  ],
});

export default router;
